//
//  Common.swift
//  STVVeibo
//
//  Created by leergou on 16/7/20.
//  Copyright © 2016年 WhiteHouse. All rights reserved.
//rangyuan05788697@163.com

import UIKit

// 通知
// 切换控制器通知
let SwitchRootViewContrller = "SwitchRootViewContrller"
// 表情按钮删除键点击通知
let EmoticonDeleteButtonClick = "EmoticonDeleteButtonClick"
// 表情按钮点击通知
let EmoticonButtonsClick = "EmoticonButtonsClick"

// ====自己的======
// 微博账号
let wbAccount = "18221598504"
let wbPassword = "zhao19850512"
// 新浪微博相关信息
let APPKEY = "3080403831"
let APPSECRET = "642abebb9d2369d41b4a44bfb1999109"
// ====自己的======

let APPREDIRECT_URI = "http://www.baidu.com"
// app主体颜色
let ThemeColor = UIColor.orangeColor()

// 屏幕宽高
let SCREENW = UIScreen.mainScreen().bounds.width
let SCREENH = UIScreen.mainScreen().bounds.height

// RGB 颜色
func RGB(red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat = 1) -> UIColor {
    return UIColor(red: red / 255, green: green / 255, blue: blue / 255, alpha: alpha)
}

// 随机颜色
func RandomColor() ->UIColor{
    let r = rand() % 256
    let g = rand() % 256
    let b = rand() % 256
    
    return RGB(CGFloat(r), green: CGFloat(g), blue: CGFloat(b))
}


func printLog<T>(message: T,file:String = __FILE__, line:Int = __LINE__, function: String = __FUNCTION__){
    // 上线后关闭打印 因为打印消耗性能
    #if DEBUG
        let f = (file as NSString).lastPathComponent
        let result = "\(f) [\(line)] \(function) : \(message)"
        print(result)
    #endif
}





